package com.jdd.modules.order.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.jdd.modules.form.entity.FormParkTotalInfo;
import com.jdd.modules.order.entity.DailyOrderInfo;
import com.jdd.modules.order.entity.ParkOrderInfo;
import com.jdd.modules.order.mapper.ParkOrderInfoMapper;
import com.jdd.modules.order.service.IParkOrderInfoService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * @Description: 停车订单详情管理
 * @Author: jdd
 * @Date: 2021-03-01
 * @Version: V1.0
 */
@Service
@Slf4j
public class ParkOrderInfoServiceImpl extends ServiceImpl<ParkOrderInfoMapper, ParkOrderInfo> implements IParkOrderInfoService {

    @Resource
    private ParkOrderInfoMapper parkOrderInfoMapper;

    /**
     * 订单详情
     *
     * @param createTime
     * @return
     */
    @Override
    public List<DailyOrderInfo> orderDetail(String createTime) {
        return this.parkOrderInfoMapper.orderDetail(createTime);
    }

    /**
     * 今日订单详情
     *
     * @return
     */
    @Override
    public DailyOrderInfo todayOrderDetail() {
        return this.parkOrderInfoMapper.todayOrderDetail();
    }

    /**
     * 订单详情列表
     *
     * @return
     */
    @Override
    public List<ParkOrderInfo> orderDetailList() {
        return this.parkOrderInfoMapper.orderDetailList();
    }

    /**
     * 订单，收入
     *
     * @param startTime
     * @param endTime
     * @return
     */
    @Override
    public FormParkTotalInfo dailyOrderPayTypeNumberAndIncome(String startTime, String endTime) {
        return this.parkOrderInfoMapper.dailyOrderPayTypeNumberAndIncome(startTime, endTime);
    }
}
